package com.example.instance1.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author: zbc
 * @Description:
 * @Date: Created in 17:28 2020/9/23
 * @Modified By:
 */
@RefreshScope
@Controller
public class AppController {


    @Value("${instance:}")
    String test;

    @RequestMapping("/get")
    @ResponseBody
    public String getConfig(){

        System.out.println(this.test);
        return this.test;
    }
}
